Add CI workflow for targeted test coverage#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const evaluationContext = { value, row, context, rule }; | ||
| const resolvedArgs = resolveTokens(rule.args ?? ['$value'], evaluationContext); | ||
| const result = await resolver(value, row, context, rule, resolvedArgs); | ||
| const normalised = normaliseExternalResult(result, rule); |
There was a problem hiding this comment.
Pass resolved custom rule args to resolver positionally
The custom validator resolves rule.args but then invokes the external resolver as resolver(value, row, context, rule, resolvedArgs), so the resolved tokens are only available inside an array passed as the fifth parameter. Resolvers written to consume the tokens positionally—such as cuentaHabilitadaParaAlta(cuenta, dni) in configs/external-checks.json—instead receive (value, row) and thus mis-evaluate valid rows (row 1 in that config is flagged even though the DNI and account are correct). The call site should spread the resolved arguments when invoking the resolver or otherwise map them to the expected positional parameters so that rule.args actually influences the validation.
Useful? React with 👍 / 👎.
Summary
Testing